package tech.heptagram.staff.model.enums;

import lombok.Getter;

/**
 * @author daxiong
 * @date 2019/4/2
 */
public enum CompanyType {

    BBT("波巴布", "dingab00183bf014ca6c35c2f4657eb6378f"),
    ZHONGFL("房联天下", "dingfd3493d840ff305e35c2f4657eb6378f");

    @Getter
    private String name;
    @Getter
    private String corpId;

    CompanyType(String name, String corpId) {
        this.name = name;
        this.corpId = corpId;
    }

    public static String corpIdOf(String corpId){
        for (CompanyType company : CompanyType.values()){
            if (company.getCorpId().equals(corpId)){
                return company.getName();
            }
        }
        return null;
    }
}
